home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-20
/
940set.zip
/
940SET.ASM
next >
Wrap
Assembly Source File
|
1991-03-12
|
2KB
|
135 lines
; *****************************************************************************
; TS-940/TS-790 remote control programm for IBM-PC/AT/XT
; by Southern NET
; JA6FTL JG6MCG JF6BXG JR6RRH
; 1988/05 IBM PC version
; 1988/11 PC9801 version
; INT14 handler(MBBIOS etc.) and MBMODE must be run before execute.
; Com port 1-6(A-F) allowed.
; Usage....... 940set_(port)_(parameter)(parameter)...
; example 940set a FA00014073000;MD1;
; 940set c FB00435078000; =>set VFO-B 435.078MHz via COM3
; 940set b mc103; =>set memory channel 3 of bank1
; *****************************************************************************
NUL = 00h
TAB = 09h
CR = 0dh
LF = 0ah
BEEP = 07h
error = 1
noerror = 0
print macro string
mov ax,data
mov ds,ax
lea dx,string
mov ah,09h
int 21h
endm
putch macro ch
mov dl,ch
mov ah,02h
int 21h
endm
mg group code,data
data segment
no_cn db BEEP,"Not channel [A-F]$"
cmd_e_msg db BEEP,"Commamd error! Usage:(channel) (parameter)(parameter)",CR,LF
db " example 940set_a_ch103;fa;$"
no_bios db BEEP,"Not loaded MBBIOS$"
data ends
code segment
assume cs:code;ds:code
org 81h
channel label byte
org 82h
cmdline label byte
start:
org 100h
main proc near
call bios_chk ; com bios exit ?
mov di,offset channel
argment:mov al,[di]
cmp al,CR
je cmd_error ;command error
cmp al,' '
jne port
add di,1
loop argment
port:
push ds
call chk_ch ;channel check
sub al,'A' ; get port idn
mov ah,0
mov bx,ax ; CX is port idn
pop ds
mov di,offset cmdline
add di,2
get_cmd:
mov al,[di]
add di,1
cmp al,CR
jz end_p ;end
cmp al,' ' ; skip space
jz get_cmd
call toupr
call outi
loop get_cmd
extprog:mov al,0
mov ah,4ch
int 21h
cmd_error:
print cmd_e_msg
jmp end_p
chk_ch: ;is channel A-F ?
call toupr ; to upper
cmp al,'A'
jl no_cn_msg
cmp al,'G'
jg no_cn_msg
ret
toupr:
cmp al,'Z'
jl not_small
sub al,20h
not_small:
ret
no_cn_msg: ;no channel msg
print no_cn
end_p:
mov al,0 ; normal end
mov ah,4ch
int 21h
bios_chk:
mov dx,00
mov ah,04
int 14h
cmp ax,0aa55h
jne exit ; bios not loaded
ret
exit:
print no_bios
jmp end_p
outi:
push bx
xor dx,dx
mov dx,bx ; load port_idn
mov ah,01h ; serial out cmd for int 14
int 14h
pop bx
ret
main endp
code ends
end main